import login from "../views/login/login.vue"
import home from "../views/home/home"
import modifyPwd from "../views/user/modifyPwd"


export const sider = [
    {
        path: '/product',
        name: 'product',
        component: home,
        icon:'',
        show:true,
        children: [
            { path: '/productList', icon:'',   show:true,name: 'productList', component: () => import('@/views/productManage/productList.vue') },
            { path: '/productAdvertising',icon:'',    show:true,name: 'productAdvertising', component: () => import('@/views/productManage/productAdvertising.vue') },
            { path: '/productAddAdvertising',icon:'',    show:false,name: 'productAddAdvertising', component: () => import('@/views/productManage/productAddAdvertising.vue')  },
        ]
    },
    {
        path: '/order',
        name: 'order',
        component: home,
        show:true,
        children: [
            { path: '/orderList', icon:'',  show:true, name: 'orderList', component: () => import('@/views/order/orderList.vue') },
            { path: '/auditingOrder', icon:'',  show:true, name: 'auditingOrder', component: () => import('@/views/order/auditingOrder.vue') },
        ]
    },
    {
        path: '/comment',
        name: 'comment',
        component: home,
        show:true,
        children: [
            { path: '/commentList', icon:'',  show:true, name: 'commentList', component: () => import('@/views/comment/commentList.vue') },
        ]
    },
    {
        path: '/store',
        name: 'store',
        component: home,
        show:true,
        children: [
            { path: '/storeList', icon:'',  show:true, name: 'storeList', component: () => import('@/views/store/storeList.vue') },
        ]
    },
    {
        path: '/domainManager',
        name: 'domainManager',
        component: home,
        show:true,
        children: [
      { path: '/domainList', icon:'',  show:true, name: 'domainList', component: () => import('@/views/domainManager/domainList.vue') },
        ]
    },
    {
        path: '/user',
            name: 'user',
        component: home,
        show:true,
        children: [
        { path: '/userList', icon:'',  show:true, name: 'userList', component: () => import('@/views/user/userList.vue') },
    ]
    },
]



let routes = [
    {
        path: "/",
        name: "home",
        component: home,
    },
    {
        path: "/login",
        name: "login",
        component: login,
    },
    {
        path: "/user/modifyPwd",
        name: "modifyPwd",
        component: modifyPwd,
    },
]

routes.push.apply(routes,sider)

export default {
    routes
}
